package com.examination.to.vo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

//前端文件上传的接受对象封装
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QuestionVo {

    private Integer questiontype;
    private Integer questionid;
    private Integer questionlevel;
    private Integer bankid;
    private String questioncontent;
    private String[] images;
    private String analysis;
    private String createperson;
    private Answer[] answer;
    private Integer examid;
    private Integer id;
    private String stuinfo;
    private Integer score;
    private Date examtime;
    private String createtime;

    public QuestionVo setQuestiontype(Integer questiontype) {
        this.questiontype = questiontype;
        return this;
    }

    public QuestionVo setQuestionid(Integer questionid) {
        this.questionid = questionid;
        return this;
    }

    public QuestionVo setQuestionlevel(Integer questionlevel) {
        this.questionlevel = questionlevel;
        return this;
    }

    public QuestionVo setBankid(Integer bankid) {
        this.bankid = bankid;
        return this;
    }

    public QuestionVo setQuestioncontent(String questioncontent) {
        this.questioncontent = questioncontent;
        return this;
    }

    public QuestionVo setImages(String[] images) {
        this.images = images;
        return this;
    }

    public QuestionVo setAnalysis(String analysis) {
        this.analysis = analysis;
        return this;
    }

    public QuestionVo setCreateperson(String createperson) {
        this.createperson = createperson;
        return this;
    }

    public QuestionVo setAnswer(Answer[] answer) {
        this.answer = answer;
        return this;
    }

    public QuestionVo setExamid(Integer examid) {
        this.examid = examid;
        return this;
    }

    public QuestionVo setId(Integer id) {
        this.id = id;
        return this;
    }

    public QuestionVo setStuinfo(String stuinfo) {
        this.stuinfo = stuinfo;
        return this;
    }

    public QuestionVo setScore(Integer score) {
        this.score = score;
        return this;
    }

    public QuestionVo setExamtime(Date examtime) {
        this.examtime = examtime;
        return this;
    }

    public QuestionVo setCreatetime(String createtime) {
        this.createtime = createtime;
        return this;
    }

    //答案对象
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Answer{
        private Integer id;
        private String istrue;
        private String answer;
        private String[] images;
        private String analysis;
        private String text;
        private String preview;

        public Answer setId(Integer id) {
            this.id = id;
            return this;
        }

        public Answer setIstrue(String istrue) {
            this.istrue = istrue;
            return this;
        }

        public Answer setAnswer(String answer) {
            this.answer = answer;
            return this;
        }

        public Answer setImages(String[] images) {
            this.images = images;
            return this;
        }

        public Answer setAnalysis(String analysis) {
            this.analysis = analysis;
            return this;
        }

        public Answer setText(String text) {
            this.text = text;
            return this;
        }

        public Answer setPreview(String preview) {
            this.preview = preview;
            return this;
        }
    }
}

